package apIExercise.io.io2;

import java.io.*;

public class OISDemo {
    public static void main(String[] args) throws IOException {
        String name="阿芬";
        int age=99;
        String address="女";
        String[] other={"阿芬爱上了阿强","在一个没有星星的夜晚"};
        Student af=new Student(name,age,address,other);
        FileOutputStream fos=new FileOutputStream("data.obj");
        ObjectOutputStream ois=new ObjectOutputStream(fos);
        ois.writeObject(af);
        System.out.println("书写完毕！");
        ois.close();

    }
}
